﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using MySql.Data.MySqlClient;

namespace SISTEMA_ALPROVIDE.Model
{
    class ConexionBD
    {
        MySqlConnection Conexion = new MySqlConnection();
        //private OleDbCommand ComandoBD;
        //private OleDbDataAdapter DataAdapterBD;
        //private DataSet Datos;
        //private DataSet dsConsulta;

        public MySqlConnection getConexion
        {
            get { return Conexion; }
            set { Conexion = value; }
        }
        public ConexionBD()
        {
            try
            {
                Conexion = new MySqlConnection("server=50.87.33.40;user=pardoyel_loitay;database=pardoyel_loitay;port=3306;password=loitay123;");
               
            }
            catch (MySqlException ex) { Console.WriteLine("Error"+ex.ToString()); }
        }

        public void Open() {
            Conexion.Open();
        }

        public void Close() {
            Conexion.Close();
        }
    }
}
